package hankz.spring.beans.factory.support;

import hankz.spring.beans.BeansException;
import hankz.spring.beans.factory.config.BeanDefinition;

/**
 * @auther zzc
 * @date 2021 11 17
 */
public interface BeanDefinitionRegistry {

    /**
     * 向注册表中注册 beanDefinition
     *
     * @param beanName
     * @param beanDefinition
     */
    void registerBeanDefinition(String beanName, BeanDefinition beanDefinition);

    /**
     * 使用Bean名称查询BeanDefinition
     *
     * @param beanName
     * @return
     * @throws BeansException
     */
    BeanDefinition getBeanDefinition(String beanName) throws BeansException;


    boolean containsBeanDefinition(String beanName);

    String[] getBeanDefinitionNames();
}
